<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" /> 
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script> 
<script> 
function addreason(){
	$.layer({
		type : 1,
		title :'举报原因', 
		closeBtn : [0 , true],
		border : [10 , 0.3 , '#000', true],
		area : ['300px','150px'],
		offset: ['110px', '35%'],
		page : {dom :"#addreason"}
	});
}
function checked_name(){
	var name=$.trim($("#name").val()); 
	if(name==''){ 
		parent.layer.msg('举报原因不能为空！', 2, 8);return false;
	}
}
$(document).ready(function(){
	$(".imghide").hover(function(){
		$(this).find('.class_xg').show();
	},function(){
		$(this).find('.class_xg').hide();
	});
})
</script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp"> 
<div class="admin_new_tip">
    <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
    <div class="admin_new_tip_list_cont">
      <div class="admin_new_tip_list">该页面展示了网站举报原因信息，可对举报原因进行查看操作。</div>
    </div>
  </div>
  <div class="admin_new_search_box">
  <a  href="javascript:void(0)" onClick="addreason()" class="admin_new_cz_tj" style="margin-left:0px;">+ 添加类别</a>
  </div>
  <div class="clear"></div>
<div class="table-list">
  <div class="admin_table_border">
  <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe> 
<form action="index.php" name="myform" method="get"  id='myform' target="supportiframe" > 
<table width="100%">
	<thead>
			<tr class="admin_table_top">
		    <th style="width:60px;"><label for="chkall"><input type="checkbox" id='chkAll'  onclick='CheckAll(this.form)'/></label></th>
			<th style="width:120px;">编号</th>
			<th align="left">标题(点击修改)</th>
			<th class="admin_table_th_bg">操作</th>
		</tr>
	</thead>
	<tbody>
    {yun:}foreach item=v key=key from=$reason{/yun}
    <tr align="center"{yun:}if ($key+1)%2=='0'{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$v.id{/yun}">
	    <td><input type="checkbox" value="{yun:}$v.id{/yun}"  name='del[]' onclick='unselectall()' rel="del_chk" /></td>
    	<td align="left" class="td1" style="text-align:center;"><span>{yun:}$v.id{/yun}</span></td>
   	 	<td class="od imghide" align="left">
		<span onClick="checkname('{yun:}$v.id{/yun}');" id="name{yun:}$v.id{/yun}" style="cursor:pointer;">{yun:}$v.name{/yun}</span>
        <input class="input-text hidden" type="text" id="inputname{yun:}$v.id{/yun}" value="{yun:}$v.name{/yun}" onBlur="subname('{yun:}$v.id{/yun}','index.php?m=admin_reason&c=ajax');" />
		<img class="" style="padding-left:5px;cursor:pointer;"   src="images/xg.png" onClick="checkname('{yun:}$v.id{/yun}');"/>

        </td>
    	<td><a href="javascript:void(0)" onClick="layer_del('确定要删除？','index.php?m=admin_reason&c=del&id={yun:}$v.id{/yun}')" class="admin_new_c_bth admin_new_c_bth_sc">删除</a>
        </td>
  </tr>
  {yun:}/foreach{/yun}
  <tr>
  <td align="center"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' />
    </td>
    <td colspan="3"><label for="chkAll2">全选</label>&nbsp;
    <input class="admin_button"   type="button" name="delsub" value="删除所选" onClick="return really('del[]')" /></td>
   </tr>
   {yun:}if $total > $config.sy_listnum {/yun}
			<tr>
				{yun:}if $pagenum==1{/yun}
					<td colspan="1"> 从 1 到 {yun:}$config.sy_listnum {/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}else if $pagenum > 1 && $pagenum < $pages{/yun}
					<td colspan="1"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$pagenum * $config.sy_listnum{/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}else if $pagenum == $pages{/yun}
					<td colspan="1"> 从 {yun:}($pagenum-1) * $config.sy_listnum + 1{/yun} 到 {yun:}$total{/yun} ，总共 {yun:}$total{/yun} 条</td>
				{yun:}/if{/yun}
				<td colspan="3" class="digg">{yun:}$pagenav{/yun}</td>
			</tr>
		{yun:}/if{/yun}
  </tbody>
  </table>
  <input type="hidden" name="m" value="admin_reason">
  <input type="hidden" name="c" value="del">
  <input type="hidden" name="pytoken"  id='pytoken' value="{yun:}$pytoken{/yun}">
</form>
</div>
</div>
</div>
<div id="addreason"  style="display:none;"> 

	<div  class="job_box_div">  
	   <div class="job_box_inp">
	<form action="index.php" name="myform" method="get" onSubmit="return checked_name();"  target="supportiframe">
		<input name="m" value="admin_reason" type="hidden"/>
		<input name="c" value="save" type="hidden"/>
		 <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
	  <table cellspacing='1' cellpadding='1' class="admin_examine_table">
			<tr >  
            <th width="100">原因：</th>
            <td >
             <input  class="company_job_text" type="text" name="name" id='name' size="55" style="float:left" value=""> 
            </td>
            </tr>		
 			<tr><td colspan='2' align="center"class='ui_content_wrap'><input class="admin_examine_bth" type="submit" value="添加 " /></td></tr> 
		</table> 
		</form>
	   </div>
	</div>
</div>
</body>
</html>